<ui:composition template="../WEB-INF/templates/template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:tc="http://java.sun.com/jsf/composite/components">

	<ui:define name="content-title">
		<h:outputLabel>Product</h:outputLabel>
	</ui:define>
	
	<ui:define name="content">
		<f:event type="preRenderView" listener="#{productBean.initProductDetails}" />
		<h:form>
			<p:panel header="#{productBean.selectedProduct.name}">		
				<h:panelGrid columns="2">
						<p:graphicImage value="/resources/images/products/#{productBean.selectedProduct.imageName}" style="width:140px; height:100px;"/>
						<h:panelGrid columns="2">
							<p:outputLabel value="Product Number:"/>	
							<h:outputText value="#{productBean.selectedProduct.id}" />
							
							<p:outputLabel value="Product Name:"/>	
							<h:outputText value="#{productBean.selectedProduct.name}"/>
							
							<p:outputLabel value="Brand:"/>	
							<h:outputText value="#{productBean.selectedProduct.brand}"/>
							
							<p:outputLabel value="Price:"/>	
							<h:outputText value="#{productBean.selectedProduct.price} #{productBean.selectedProduct.shop.currency.symbol}"/>
							
							<p:outputLabel value="Deal Type:"/>	
							<h:outputText value="#{productBean.selectedProduct.deal}"/>
							
							<p:outputLabel value="Time Left:"/>	
							<h:outputText />
							
							<p:outputLabel value="Sellers Rating:"/>	
							<p:rating value="4" stars="5" readonly="true" />
							
											
						</h:panelGrid>
				</h:panelGrid>
				<p:commandButton value="#{productBean.selectedProduct.biddable? 'Place Bid' : 'Add to Cart'}"  style="margin-left:268px"/>
			</p:panel>
		</h:form>	
		
	</ui:define>
	
</ui:composition>
